Prevent cache of diff-mode buffers to grow without bounds
authorMattias Engdegård <mattiase@acm.org>
Sat, 3 Feb 2024 15:46:59 +0000 (16:46 +0100)
committerMattias Engdegård <mattiase@acm.org>
Sun, 4 Feb 2024 12:13:10 +0000 (13:13 +0100)
commit4d57187a248d3243dcc8b5da5d8365cb1b54a347
tree6883d6ec1e26b6f88cbdc4a53111b2ccb5c9e193
parente44b9f35793d642d5155fde035e3bc92102d13a1
Prevent cache of diff-mode buffers to grow without bounds

Previously, these " *diff-syntax:..." buffers were never removed.
Now we discard the least recently used half of them every hour.

* lisp/vc/diff-mode.el (diff--cached-revision-buffers)
(diff--cache-clean-interval, diff--cache-clean-timer, diff--cache-clean)
(diff--cache-schedule-clean, diff--get-revision-properties): New.
(diff-syntax-fontify-hunk): Use diff--get-revision-properties.
lisp/vc/diff-mode.el